Enables an object to be addressed at run-time as a string parameter through the object name.
文字列パラメータにオブジェクト名を指定することで、実行時に該当オブジェクトへアクセスします。
For example, the following command:
たとえば、下記のコマンドを行ったとします。
MyObj.Prop1.Command = 5
MyObj.Prop1.Command = 5
corresponds to the command block:
この処理は、下記のコマンドブロックに対応します。
Dim ObjVar as Object
Dim ObjVar as Object
Dim ObjProp as Object
Dim ObjProp as Object
ObjName As String = "MyObj"
ObjName As String = "MyObj"
ObjVar = FindObject( ObjName As String )
ObjVar = FindObject( ObjName As String )
PropName As String = "Prop1"
PropName As String = "Prop1"
ObjProp = FindPropertyObject( ObjVar, PropName As String )
ObjProp = FindPropertyObject( ObjVar, PropName As String )
ObjProp.Command = 5
ObjProp.Command = 5
This allows names to be dynamically created at run-time. For example:
これを利用して、実行時に名前を動的に定義できます。たとえば、
"TextEdit1" to TextEdit5" in a loop to create five control names.
ループを使用して「TextEdit1」から「TextEdit5」の 5 つのコントロール名を作成します。
See also: FindPropertyObject
次も参照してください:FindPropertyObject
FindObject( ObjName As String )
FindObject( ObjName As String )
ObjName: String that specifies the name of the object that you want to address at run-time.
ObjName: 実行時にアクセスするオブジェクト名を指定する文字列。